#ifndef SCENE_H
#define SCENE_H

#include <iostream>
#include "shader.h"

struct Scene {
    Shader shader;

    virtual void init() {
        std::cout << "[warn] using default init function" << std::endl;
    }
    virtual void render() {
        glClearColor(0.2f, 0.3f, 0.3f, 1.0f); // rgba
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // GL_STENCIL_BUFFER_BIT
        shader.use();
        glBindVertexArray(VAO);
    }
    virtual void destroy() {
        glDeleteVertexArrays(1, &VAO);
        glDeleteBuffers(1, &VBO);
        glDeleteProgram(shader.id);
    }
};

extern Scene *scenes[];
extern int nScenes;

#endif // SCENE_H
